/*
 * 企业管理
 */

import { createAPI } from '@/utils/request'
class Company {
  list = data => createAPI('/companys', 'get', data)
  add = data => createAPI('/companys', 'post', data)
  update = data => createAPI(`/companys/${data.id}`, 'put', data)
  remove = data => createAPI(`/companys/${data.id}`, 'delete', data)
  detail = data => createAPI(`/companys/${data.id}`, 'get', data)
  disabled = data => createAPI(`/companys/${data.id}/${data.state}`, 'post', data)
}
export default new Company()
